<?php if((count($villageViviendasAppt) + count($villageViviendasVillas)) >0): ?>

<?php if((count($villageViviendasVillas)) >0): ?>
<div class="sidebox">	
		<h1 class="clear"><?php echo link_to('Location de villas &agrave; '.$nomVillage, 'list_location_village', array('slug' =>ViviendaAlquiler::slugify($nomVillage, '_')));  ?></h1>
		<ul class="sidemenu">
			<?php foreach($villageViviendasVillas as $index=>$villageVivienda): ?>
				<?php if ($index==5): ?>
					<li class="sideShowMore">...voir toutes...</li>
					<div class="cacher"/>
				<?php endif; ?>
				<li><?php echo link_to(ucwords($villageVivienda->getBrefSlug())." ".$villageVivienda->getAlias()." (".$villageVivienda->getCapacidad()."p.)", 'location_show', $villageVivienda, array('title' => $villageVivienda->getDesc_brev_fr()))  ?></li>
			<?php endforeach ?>
			<?php if ($index>4): ?>
				</div>
			<?php endif; ?>
		</ul>
</div>
<?php endif ?>

<?php if((count($villageViviendasAppt)) >0): ?>
<div class="sidebox">	
		<h1 class="clear"><?php echo link_to('Location d\'appts. &agrave; '.$nomVillage, 'list_costa_brava_villages')  ?></h1>
		<ul class="sidemenu">
			<?php foreach($villageViviendasAppt as $index=>$villageVivienda): ?>
				<?php if ($index==5): ?>
					<li class="sideShowMore">...voir toutes...</li>
					<div class="cacher"/>
				<?php endif; ?>
				<li><?php echo link_to(ucwords($villageVivienda->getBrefSlug())." ".$villageVivienda->getAlias()." (".$villageVivienda->getCapacidad()."p.)", 'location_show', $villageVivienda, array('title' => $villageVivienda->getDesc_brev_fr()))  ?></li>
			<?php endforeach ?>
			<?php if ($index>4): ?>
				</div>
			<?php endif; ?>
		</ul>
</div>
<?php endif ?>
	
<?php endif ?>

<script type='text/javascript'>
	$(document).ready(function(){
		$(".cacher").hide();
		$(".sideShowMore").click(function(){
			$(this).hide();
			$(this).next(".cacher").slideToggle(600);
		});
	});
</script>